﻿function Assessments_onComplete(e) {
    if (e.response.modelState != null) {
        displayModelStateErrors(e.response.modelState);
    }
}

function displayModelStateErrors(modelState) {
    // Alert the user of any model state errors not tied to a specific element
    if (modelState[""] != null && modelState[""].errors != null) {
        var alertMessage = "";
        for (var i = 0; i < modelState[""].errors.length; i++) {
            alertMessage = alertMessage + modelState[""].errors[i] + "\r\n";
        }
        alert(alertMessage);
    }
}
